package de.gee.erep.shared.entities;

import java.util.List;
import com.google.gwt.user.client.rpc.IsSerializable;

/***/
public class Country implements IsSerializable, Comparable<Country> {
	/***/
	private int regionCount;
	/***/
	private int averageCitizenLevel;
	/***/
	private int citizenCount;
	/***/
	private String countryCode;
	/***/
	private String continent;
	/***/
	private String currency;
	/***/
	private String name;
	/***/
	private int citizenFee;
	/***/
	private int id;
	/***/
	private List<Region> regions;

	/***/
	private Country() {
	}

	/**
	 * @param countryPars
	 *            Parameterobject
	 */
	public Country(final CountryPars countryPars) {
		this.regionCount = countryPars.regionCount;
		this.averageCitizenLevel = countryPars.averageCitizenLevel;
		this.citizenCount = countryPars.citizenCount;
		this.countryCode = countryPars.countryCode;
		this.continent = countryPars.continent;
		this.currency = countryPars.currency;
		this.name = countryPars.name;
		this.citizenFee = countryPars.citizenFee;
		this.id = countryPars.id;
		this.regions = countryPars.regions;
	}

	/**
	 * 
	 * @return int
	 */
	public final int getRegionCount() {
		return regionCount;
	}

	/**
	 * 
	 * @return int
	 */
	public final int getAverageCitizenLevel() {
		return averageCitizenLevel;
	}

	/**
	 * 
	 * @return int
	 */
	public final int getCitizenCount() {
		return citizenCount;
	}

	/**
	 * @return String
	 */
	public final String getCountryCode() {
		return countryCode;
	}

	/**
	 * @return String
	 */
	public final String getContinent() {
		return continent;
	}

	/**
	 * @return String
	 */
	public final String getCurrency() {
		return currency;
	}

	/**
	 * @return String
	 */
	public final String getName() {
		return name;
	}

	/**
	 * @return int
	 */
	public final int getCitizenFee() {
		return citizenFee;
	}

	/**
	 * @return int
	 */
	public final int getId() {
		return id;
	}

	/**
	 * @return List
	 */
	public final List<Region> getRegions() {
		return regions;
	}

	@Override
	public final String toString() {
		return "[ " + getName() + "] " + getRegionCount() + "=="
				+ getRegions().size();
	}

	/**
	 * @see java.lang.Comparable#compareTo(java.lang.Object)
	 * @param c
	 *            country
	 * @return erg
	 */
	@Override
	public final int compareTo(final Country c) {
		return this.name.compareTo(c.name);
	}
}
